package com.catsic.zcjc.dao;

import java.util.List;

import javax.persistence.QueryHint;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.QueryHints;

import com.catsic.base.BaseDao;
import com.catsic.zcjc.entity.District;


public interface DistrictDao extends BaseDao<District, Long>{

	@Query("select d from District d where d.city.id = ?1 order by id asc")
	@QueryHints({ @QueryHint(name = "org.hibernate.cacheable", value ="true") })
	public List<District> findByCity(Long cityId);
	
}
